#!/usr/bin/python

from abc import ABCMeta, abstractmethod
import platform

'''
Base task
'''

from abc import ABCMeta, abstractmethod

class BaseTask(metaclass=ABCMeta):
    """abstract base class"""

    def __init__(self, name):
        self.name = name
        self.start_time = None
        self.finish_time = None
        self.status = None
        self.error = None
        self.data = None
        self.cost = None
        self.priority = 0
        self.state = None
        self.runHost = platform.node()

    @abstractmethod
    def process(self, context):
        '''process task
        '''
        pass

    @abstractmethod
    def verify(self, context):
        '''verify task result
        '''
        pass
